.demo11 {
  position: absolute;
  width: 16px;
  height: 16px;
  left: 50%;
  top: 50%;
  transform: translate(-100%, -100%);

  div {
    width: 20px;
    height: 20px;
    background: #344966;
    border-radius: 50%;
    position: absolute;
    opacity: 1;

    // 四个元素分别位移，循环到上一个元素的位置
    &:nth-child(1) {
      left: 50%;
      top: 0;
      animation: demo11_1 1s linear infinite;
      animation-play-state: paused;
    }

    &:nth-child(2) {
      left: 100%;
      top: 50%;
      animation: demo11_2 1s linear infinite;
      animation-play-state: paused;
    }

    &:nth-child(3) {
      left: 50%;
      top: 100%;
      animation: demo11_3 1s linear infinite;
      animation-play-state: paused;
    }

    &:nth-child(4) {
      left: 0;
      top: 50%;
      animation: demo11_4 1s linear infinite;
      animation-play-state: paused;
    }
  }

  @keyframes demo11_1 {

    0% {
      left: 50%;
      top: 0;
      opacity: .35;
    }

    50% {
      left: 200%;
      top: -100%;
      opacity: 1;
    }

    // 第一个元素位移的100%是第二个元素的起始位置
    100% {
      left: 100%;
      top: 50%;
      opacity: .35;
    }
  }

  @keyframes demo11_2 {

    0% {
      left: 100%;
      top: 50%;
      opacity: .35;
    }

    50% {
      left: 200%;
      top: 200%;
      opacity: 1;
    }

    // 第二个元素位移的100%是第三个元素的起始位置
    100% {
      left: 50%;
      top: 100%;
      opacity: .35;
    }
  }

  @keyframes demo11_3 {

    0% {
      left: 50%;
      top: 100%;
      opacity: .35;
    }

    50% {
      left: -100%;
      top: 200%;
      opacity: 1;
    }

    // 第三个元素位移的100%是第四个元素的起始位置
    100% {
      left: 0;
      top: 50%;
      opacity: .35;
    }
  }

  @keyframes demo11_4 {

    0% {
      left: 0;
      top: 50%;
      opacity: .35;
    }

    50% {
      left: -100%;
      top: -100%;
      opacity: 1;
    }

    // 第四个元素位移的100%是第一个元素的起始位置
    100% {
      left: 50%;
      top: 0;
      opacity: .35;
    }
  }

  &.active {
    animation-play-state: running;

    div {
      animation-play-state: running;
    }
  }
}

.demo12 {
  position: absolute;
  width: 100px;
  height: 100px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);

  div {
    width: 20px;
    height: 20px;
    background: #344966;
    border-radius: 50%;
    float: left;
    margin-left: 10px;
    margin-top: 10px;
    opacity: 1;
    animation: demo12 1s linear infinite;
    animation-play-state: paused;

    &:nth-child(1) {
      animation-delay: -0.1s;
    }

    &:nth-child(2) {
      animation-delay: -0.2s;
    }

    &:nth-child(3) {
      animation-delay: -0.1s;
    }

    &:nth-child(4) {
      animation-delay: -0.6s;
    }

    &:nth-child(5) {
      animation-delay: -0.3s;
    }

    &:nth-child(6) {
      animation-delay: -0.8s;
    }

    &:nth-child(7) {
      animation-delay: -0.4s;
    }

    &:nth-child(8) {
      animation-delay: -0.6s;
    }

    &:nth-child(9) {
      animation-delay: -0.2s;
    }
  }

  @keyframes demo12 {
    50% {
      opacity: 0.3;
    }
  }

  &.active {
    div {
      animation-play-state: running;
    }
  }
}

.demo13 {
  position: absolute;
  width: 100px;
  height: 100px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);

  div {
    width: 20px;
    height: 20px;
    background: #344966;
    border-radius: 50%;
    float: left;
    margin-left: 10px;
    margin-top: 10px;
    opacity: 1;
    transform: scale(1, 1);
    animation: demo13 1s linear infinite;
    animation-play-state: paused;

    &:nth-child(1) {
      animation-delay: -0.1s;
    }

    &:nth-child(2) {
      animation-delay: -0.2s;
    }

    &:nth-child(3) {
      animation-delay: -0.1s;
    }

    &:nth-child(4) {
      animation-delay: -0.6s;
    }

    &:nth-child(5) {
      animation-delay: -0.3s;
    }

    &:nth-child(6) {
      animation-delay: -0.8s;
    }

    &:nth-child(7) {
      animation-delay: -0.4s;
    }

    &:nth-child(8) {
      animation-delay: -0.6s;
    }

    &:nth-child(9) {
      animation-delay: -0.2s;
    }
  }

  @keyframes demo13 {
    50% {
      opacity: 0.3;
      transform: scale(0.5, 0.5);
    }
  }

  &.active {
    div {
      animation-play-state: running;
    }
  }
}

.demo14 {
  width: 100%;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;

  div {
    width: 20px;
    height: 20px;
    background: #344966;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    &:nth-child(1) {
      margin-left: -30px;
      animation: demo14_1 1s ease-in-out infinite;
      animation-play-state: paused;
    }

    &:nth-child(2) {
      margin-left: -10px;
    }

    &:nth-child(3) {
      margin-left: 10px;
    }

    &:nth-child(4) {
      margin-left: 30px;
      animation: demo14_2 1s ease-in-out infinite;
      animation-play-state: paused;
    }
  }

  @keyframes demo14_1 {
    0% {
      margin-left: -30px;
    }

    25% {
      margin-left: -60px;
    }

    50% {
      margin-left: -30px;
    }
  }

  @keyframes demo14_2 {
    0% {
      margin-left: 30px;
    }

    50% {
      margin-left: 30px;
    }

    75% {
      margin-left: 60px;
    }

    100% {
      margin-left: 30px;
    }
  }

  &.active {
    div {
      animation-play-state: running;
    }
  }
}

.demo15 {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;

  div {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 20px;
    background: #344966;
    border-radius: 50%;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1, 1);
    animation: demo15 1s linear infinite;
    animation-play-state: paused;

    &:nth-child(1) {
      margin-left: -30px;
      animation-delay: -0.2s;
    }

    &:nth-child(2) {
      animation-delay: -0.1s;
    }

    &:nth-child(3) {
      margin-left: 30px;
      animation-delay: 0s;
    }
  }

  @keyframes demo15 {

    0%,
    20% {
      transform: translate(-50%, -50%) scale(1, 1);
      opacity: 1;
    }

    50% {
      transform: translate(-50%, -50%) scale(0.2, 0.1);
      opacity: 0;
    }

    80%,
    100% {
      transform: translate(-50%, -50%) scale(1, 1);
      opacity: 1;
    }
  }

  &.active {
    div {
      animation-play-state: running;
    }
  }
}

.demo16 {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;

  div {
    width: 20px;
    height: 20px;
    background: #344966;
    border-radius: 50%;
    position: absolute;

    &:nth-child(1) {
      left: 15px;
      top: 20px;
      opacity: 1;
      transform: scale(1, 1);
      animation: demo16_1 1s linear infinite;
      animation-play-state: paused;
    }

    &:nth-child(2) {
      left: 65px;
      top: 20px;
      opacity: 1;
      transform: scale(1, 1);
      animation: demo16_1 1s linear infinite;
      animation-play-state: paused;
    }

    &:nth-child(3) {
      left: 115px;
      top: 20px;
      opacity: 1;
      transform: scale(1, 1);
      animation: demo16_1 1s linear infinite;
      animation-play-state: paused;
    }

    &:nth-child(4) {
      left: 40px;
      top: 105px;
      opacity: 1;
      transform: scale(1, 1);
      animation: demo16_2 1s linear infinite;
      animation-play-state: paused;
    }

    &:nth-child(5) {
      left: 90px;
      top: 105px;
      opacity: 1;
      transform: scale(1, 1);
      animation: demo16_2 1s linear infinite;
      animation-play-state: paused;
    }
  }

  // 动画：0-》50%-》100%
  // 透明度：1-》0.3-》1
  // 位移：最上-》到达最底部之后向上返回-》到达最顶且停留了0.25s
  // 缩放：最大-》最小-》最大
  @keyframes demo16_1 {
    0% {
      opacity: 1;
      transform: scale(1, 1);
      top: 20px;
    }

    25% {
      top: 105px;
    }

    50% {
      opacity: 0.3;
      transform: scale(0.3, 0.3);
    }

    75% {
      top: 20px;
    }

    100% {
      opacity: 1;
      transform: scale(1, 1);
      top: 20px;
    }
  }

  // 动画：0-》50%-》100%
  // 透明度：1-》0.3-》1
  // 位移：最底部-》到达最顶部之后向下返回-》到达最底且停留了0.25s
  // 缩放：最大-》最小-》最大
  @keyframes demo16_2 {
    0% {
      opacity: 1;
      transform: scale(1, 1);
      top: 105px;
    }

    25% {
      top: 20px;
    }

    50% {
      opacity: 0.3;
      transform: scale(0.3, 0.3);
    }

    75% {
      top: 105px;
    }

    100% {
      opacity: 1;
      transform: scale(1, 1);
      top: 105px;
    }
  }

  &.active {
    div {
      animation-play-state: running;
    }
  }
}

.demo17 {
  position: absolute;
  width: 100%;
  height: 20px;
  left: 0;
  top: 50%;
  transform: translateY(-50%);

  div {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #344966;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    animation: demo17 1s ease-in-out infinite;
    animation-play-state: paused;

    &:nth-child(1) {
      margin-left: -30px;
      animation-delay: -0.2s;
    }

    &:nth-child(2) {
      margin-left: 0;
      animation-delay: -0.1s;
    }

    &:nth-child(3) {
      margin-left: 30px;
      animation-delay: 0s;
    }
  }

  // 动画分成三个阶段
  // 第一阶段-从中间向下到最底部
  // 第二阶段-从最底部到最顶部
  // 第三阶段-从最顶部到中间
  @keyframes demo17 {
    0% {
      top: 0;
    }

    33% {
      top: 100%;
    }

    66% {
      top: -100%;
    }

    100% {
      top: 0;
    }
  }

  &.active {
    div {
      animation-play-state: running;
    }
  }
}

.demo18 {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;

  div {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) rotate(0deg);
    width: 20px;
    height: 20px;
    background: #344966;
    border-radius: 50%;
    animation: demo18 1s ease-in-out infinite;
    animation-play-state: paused;

    &::before,
    &::after {
      content: "";
      position: absolute;
      width: 20px;
      height: 20px;
      background: #344966;
      border-radius: 50%;
    }

    &::before {
      top: 0;
      left: -200%;
    }

    &::after {
      top: 0;
      left: 200%;
    }
  }

  @keyframes demo18 {
    0% {
      transform: translate(-50%, -50%) rotate(0deg);
    }

    50% {
      transform: translate(-50%, -50%) rotate(180deg);
    }

    100% {
      transform: translate(-50%, -50%) rotate(360deg);
    }
  }

  &.active {
    div {
      animation-play-state: running;
    }
  }
}

.demo19 {
  position: absolute;
  width: 20px;
  height: 20px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);

  div {
    width: 20px;
    height: 20px;
    background: #344966;
    border-radius: 50%;
    position: absolute;
    top: 0;
    transform: scale(1, 1);
    animation: demo19 2s linear infinite;
    animation-play-state: paused;

    &:nth-child(1) {
      left: 200%;
      animation-delay: 0s;
    }

    &:nth-child(2) {
      left: 100%;
      animation-delay: -0.4s;
    }

    &:nth-child(3) {
      left: 0;
      animation-delay: -0.8s;
    }

    &:nth-child(4) {
      left: -100%;
      animation-delay: -1.2s;
    }

    &:nth-child(5) {
      left: -200%;
      animation-delay: -1.6s;
    }
  }

  @keyframes demo19 {
    0% {
      transform: scale(1, 1);
      left: 200%;
      top: 0;
    }

    70% {
      transform: scale(1, 1);
      left: -200%;
      top: 0;
    }

    75% {
      transform: scale(0.8, 1.2);
    }

    80% {
      transform: scale(1, 1);
      left: -200%;
      top: -100%;
    }

    85% {
      transform: scale(1.2, 0.8);
    }

    90% {
      transform: scale(1, 1);
      left: 200%;
      top: -100%;
    }

    95% {
      transform: scale(0.8, 1.2);
    }

    100% {
      transform: scale(1, 1);
      left: 200%;
      top: 0;
    }
  }

  &.active {
    div {
      animation-play-state: running;
    }
  }
}

.demo20 {
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;

  div {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 80px;
    height: 80px;
    opacity: 0.3;
    background: #344966;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(1, 1);
    animation: demo20 1s linear infinite;
    animation-play-state: paused;
  }

  @keyframes demo20 {
    0% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(0, 0);
    }

    50% {
      opacity: 0.8;
    }

    100% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(1, 1);
    }
  }

  &.active {
    div {
      animation-play-state: running;
    }
  }
}